import type { UserInfoType } from '../types/user'
import fetchMock from 'fetch-mock'
import Mock from 'mockjs'
const Random = Mock.Random;

fetchMock.config.allowRelativeUrls = true
// 获取用户信息

const mockUserInfoData : UserInfoType = Mock.mock({
  'id':'@id',
  'userName':'@cname',
  'sex|1': ['男', '女'],
  'familyMemberNum|1-5':1,
  'bandAccountNum|20-60':20,
  'familyJiFen|1000-5000':1000
})
console.log('mockUserInfoData:',mockUserInfoData)
fetchMock.mockGlobal().get('/api/getUserInfo', {
  code: 0,
  data: mockUserInfoData
});

